Skip to content

fix(update): restart the stackvox daemon after an app update#124

Merged
StuBehan merged 1 commit into
mainfrom
fix/restart-daemon-on-update
Jul 10, 2026
Merged

fix(update): restart the stackvox daemon after an app update#124
StuBehan merged 1 commit into
mainfrom
fix/restart-daemon-on-update

Conversation

@StuBehan

Copy link
Copy Markdown
Collaborator

Summary

The in-app updater swaps a new bundle (with a fresh stackvox venv) into place but only kickstarted the panel launchd agent — never the daemon. So the long-running stackvox serve kept executing the pre-update engine until the next login or crash, and engine fixes (streaming playback, pronunciation, …) silently didn't take effect after an app update. This is how you can end up with a new client but a stale daemon doing the actual playback.

Changes

  • panel/Updater.swift: parameterize kickstartLaunchd(_ label:) and add restartDaemon(), called right after the atomic swap. It kickstarts com.stackonehq.stack-nudge-daemon so the daemon re-execs the stackvox engine the swap just installed.
  • Non-fatal by design: launchd KeepAlive already brings the daemon back on next login, and shell installs that never registered the daemon agent just get a harmless "not loaded" kickstart.

Testing

  • swiftc -typecheck panel/*.swift shared/*.swift — clean (only the pre-existing onChange(of:perform:) deprecation warnings, unrelated to this change).
  • Not yet exercised through a full release-to-release in-app update (that needs a packaged build). To verify manually after an update: confirm the daemon PID changed — launchctl print gui/$(id -u)/com.stackonehq.stack-nudge-daemon — and that stackvox status reports the updated engine version.

Pairs with a companion stackvox change that makes stackvox status print a client/daemon version-skew warning, so any remaining drift is visible rather than silent.

Related issues

None.

The in-app updater swaps the new bundle (with a fresh stackvox venv) into place
but only kickstarted the panel agent — never the daemon. So the long-running
`stackvox serve` kept executing the pre-update engine until the next login or
crash, and engine fixes (streaming playback, pronunciation, ...) silently did
not take effect after updating.

Parameterize kickstartLaunchd(label:) and kickstart the daemon agent
(com.stackonehq.stack-nudge-daemon) after the atomic swap. Non-fatal: launchd
KeepAlive covers it on next login, and shell installs without the daemon agent
just get a harmless no-op kickstart.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@StuBehan StuBehan merged commit 3acab5f into main Jul 10, 2026
6 checks passed
@StuBehan StuBehan deleted the fix/restart-daemon-on-update branch July 10, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant